const moveDecorator:ClassDecorator = (target:Function) => {
    target.prototype.name = "后盾人";
    target.prototype.getPosition = ():{x:number, y:number} => {
        return {x:100,y:200}
    }
}

// @moveDecorator
class Player{
    // name:string
    // public getPosition() {}
}
moveDecorator(Player);      //使用@moveDecorator是语法糖，实际内部是moveDecorator(Player);
const p = new Player();
console.log((p as any).name);
console.log((p as any).getPosition());

@moveDecorator
class Tank{}
const t = new Tank();
console.log((t as any).name);
console.log((<any>t).getPosition());